]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaceThumbnail: Fix the dynamic workspaces check for dragging
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 22 Sep 2012 22:57:57 +0000 (19:57 -0300)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 2 Oct 2012 19:15:23 +0000 (16:15 -0300)
Be able to move windows between workspaces with static workspaces
enabled; the incorrect check here simply disabled all dragging
operations.

https://bugzilla.gnome.org/show_bug.cgi?id=684641

js/ui/workspaceThumbnail.js

index ab2e7ad42c614214f1e811219a419eced086f52a..d0bc3e866d7a81e06c9585726ad52956826e54c2 100644 (file)
@@ -620,9 +620,7 @@ const ThumbnailsBox = new Lang.Class({
         if (!source.realWindow && !source.shellWorkspaceLaunch && source != Main.xdndHandler)
             return DND.DragMotionResult.CONTINUE;
 
-        if (!Meta.prefs_get_dynamic_workspaces())
-            return DND.DragMotionResult.CONTINUE;
-
+        let canCreateWorkspaces = Meta.prefs_get_dynamic_workspaces();
         let spacing = this.actor.get_theme_node().get_length('spacing');
 
         this._dropWorkspace = -1;
@@ -647,7 +645,7 @@ const ThumbnailsBox = new Lang.Class({
             if (i == this._dropPlaceholderPos)
                 targetBottom += this._dropPlaceholder.get_height();
 
-            if (y > targetTop && y <= targetBottom && source != Main.xdndHandler) {
+            if (y > targetTop && y <= targetBottom && source != Main.xdndHandler && canCreateWorkspaces) {
                 placeholderPos = i;
                 break;
             } else if (y > targetBottom && y <= nextTargetTop) {